package com.group.admin.controller;

import com.group.admin.service.impl.AdminServiceImpl;
import com.group.commons.entity.Admin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author :spj
 * @date:2022/6/6
 * @description:
 */
@RestController
@RequestMapping("/admin")
public class AdminController {
    @Resource
    AdminServiceImpl adminService;

    @GetMapping("/admin/{id}")
    public Admin getAdmin(@PathVariable("id")int id){
        return adminService.findAdminByPid(id);
    }
}
